/***********************************************************************************************************************
 *   This is the GENy OEM user config file for GM SLP6 GENy (_MandatoryDeliverPreconfig.cfg).
 *   This file should be modified according to your requirements. It need to be added to your GENy configuration
 *   to FblDrvCan_XX->User Config File
 *......................................................................................................................
 * History    2014-06     01.00.00   A. Wenckebach (Vector)     Creation
 *            2014-09-26  01.00.01   A. Wenckebach              changed default tester node address from F1 to F5
 *            2014-10-16  01.00.02   A. Wenckebach              Move fix elements to preconfig
 *            2014-11-26  01.00.03   A. Wenckebach              Correct comment, add undef for FBL_CAN_FUNC_RXID
 *            2014-12-12  01.01.00   A. Wenckebach              Add multiple nodes use case.
 *            2015-06-10  01.02.00   A. Wenckebach              Add example to overwrite P2 timeout.
 *            2016-04-15  01.03.00   A. Wenckebach              Consider GB6002 different P2 timing definitions.
 *            2016-07-25  01.04.00   A. Wenckebach              Changes towards Cw 2.xx config, add tester node addr 6
 *            2016-12-14  01.05.00   A. Wenckebach              Allow for more flexible 11-bit CanId configuration
 *            2017-03-30  01.06.00   A. Wenckebach              Update default 11-bit configto GB6000 2017 (January 27th)
 *                                                               Remove tester F6
 *            2017-04-04  01.07.00   A. Wenckebach              Correct internal versions and release dates
 *            2017-04-07  01.08.00   A. Wenckebach              Correct wrongly set comment
 ***********************************************************************************************************************/

/**************************************************/
/** Diagnostic Timing related                    **/
/**************************************************/

/* Overwrite default P2*Server. The default according to GB6002 V1.3 is set automatically, without overwriting necessary.
 * Note that in GB6002 versions prior to V1.3 5000ms timing was inherited from GB6000. */
/* #define FBL_DIAG_TIME_P3MAX 5000u */

/**************************************************/
/** CAN Id related items                         **/
/**************************************************/

/* Unset DIAG_NODE_ADDRESS */
#if defined ( DIAG_NODE_ADDRESS )
# undef DIAG_NODE_ADDRESS
#endif

/* The below addresses are used for software tester id filtering in ApplFblCheckTesterSourceAddr() */
#define DIAG_TESTER_NODE_ADDR1               0x000000F1ul /* Can offboard Id1 */
#define DIAG_TESTER_NODE_ADDR2               0x000000F2ul /* Can offboard Id2 */
#define DIAG_TESTER_NODE_ADDR3               0x000000F3ul /* Can onboard Id1 */
#define DIAG_TESTER_NODE_ADDR4               0x000000F4ul /* Ethernet onboard Id1 */
#define DIAG_TESTER_NODE_ADDR5               0x000000F5ul /* Etherned offboard Id1 */

/* Used for 11-bit requests, response will be  */
#define FBL_CW_FIXED_FLOWCONTROL_TARGET_ADDR   0x000000FCul  /* Target Address used for Flow Control */
#define FBL_DIAG_RESP_TARGADDR_11BIT_INIT      0x000000F1ul  /* Shall be tester F1 after clarification with GM */
#if !defined(FBL_CW_FIXED_RESPONSE_TARGET_ADDR)
# define FBL_CW_FIXED_RESPONSE_TARGET_ADDR     FblDiagGetTesterAddr()
#endif /* FBL_CW_FIXED_RESPONSE_TARGET_ADDR */

/* Customer TODO:
 * Please choose DIAG_NODE_ADDRESS for your ECU (DIAG_NODE_ADDRESS_2ND in case of Multiple Nodes configuration)  */
#define DIAG_NODE_ADDRESS                    0x00000045ul
# define DIAG_NODE_ADDRESS_2ND               0x00000046ul

/**************************************************/
/** Secured download related configuration items **/
/**************************************************/
/* Develop feature to verify Integrity word in header. Check User Docu for further information*/
/* #define FBL_ENABLE_VERIFY_INTEGRITY_WORD */


/**************************************************/
/** NVM (test) configuration items               **/
/**************************************************/
/* Develop features to populate NVM on bootloader start  Check User Docu for further information*/

/* This can be used for test purpose to Write SBA ticket from flash sbaBlk0 to NVM */
/* #define  FBL_TEST_SBA_TICKET */

/* This can be used for test purpose to Write Ecu-Id (if you dont change it: from FblHeader).
 * Note: The FblHeader field ECUID could be used to fullfill the requirement, if the
 * content is modified in the hexfile for each controller part to be unique.
 */
/* #define  FBL_TEST_ECU_ID */

/* writes 0x0000 key NBID on startup */
/* #define  FBL_TEST_KEY_NBID */

/* writes 0x0000 app NBID on startup */
/* #define FBL_TEST_APP_NBID */

/**************************************************/
/** Other items                                  **/
/**************************************************/
#if defined( FBL_USE_FBL_AS_DEMOAPPL )
# include "fbl_demo_appl.h"
#endif

#if defined (FBL_ENABLE_COMPRESSION_MODE)
/* Add the compression method that fits to the delivery */
/* # define DATA_TYPE_COMPRESSED_ARLE */
# define DATA_TYPE_COMPRESSED_LZMA
#endif

/* Hardware specific: Required to (re-)use Settings that have been used with the environment @Vector */
#define FBL_ENABLE_VECTOR_HW
#define CUSTOMER_HW

/* Enable Fee Wrapper Functions */
/* #define FBL_APNV_USE_FUNCTIONS */

/* Enable Fee NVM Handling */
/* #define FBL_HDR_DISABLE_BASIC_NVM_HANDLING */

#if !defined( FBL_HDR_DISABLE_BASIC_NVM_HANDLING )
/* No EEPROM or FEE is used. Handle NBIDs in Flash */
/* Reserve XXXX bytes length. Allows for max XXXX byte/(2 * MEM_SEGMENT_SIZE) = YYYY updates each. */
# define FBL_NBID_MEMORY_BASE        0x10000ul /* Start of NBID area (erased, protected mem, compare TechRef) */
# define FBL_NBID_TOTAL_MEMORY_LEN   0x10000ul /* XXXX bytes length */
#endif

/**********************************************************/
/** End of user conf. file _MandatoryDeliverPreconfig.cfg */
/**********************************************************/
